package com.cmwa.scbp.sys.msg.vo;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import com.cmwa.scbp.sys.attach.entity.FileVo;

public class EmailVo {
	private List<String> to;
	private List<String> bcc;
	private List<String> cc;
	private String from;
	private List<Map<String, String>> attachment;
	private String subject;
	private String content;
	private String contentType;
	private String isOut;
	
	private String nickName;
	
	/**
	 * 内存中的文件，以邮件附件方式发送
	 */
	private List<FileVo> attFiles;
	
	/**
	 * 是否取本地附件名字、作为发送附件显示的名字
	 */
	private Boolean isTransformFileName;
	
	public EmailVo() {
		contentType = "text/plain";
	}

	
	public List<String> getTo() {
		return to;
	}
	public void setTo(List<String> to) {
		this.to = to;
	}
	public void addTo(String to) {
		if(this.to == null){
			this.to=new ArrayList<String>();
		}
		this.to.add(to);
	}
	public void addTo(List<String> to) {
		if(this.to == null){
			this.to = to;
		}else{
			this.to.addAll(to);
		}
	}

	
	public List<String> getBcc() {
		return bcc;
	}	
	public void setBcc(List<String> bcc) {
		this.bcc = bcc;
	}
	public void addBcc(String bcc) {
		if(this.bcc == null){
			this.bcc=new ArrayList<String>();
		}
		this.bcc.add(bcc);
	}
	public void addBcc(List<String> bcc) {
		if(this.bcc == null){
			this.bcc = bcc;
		}else{
			this.bcc.addAll(bcc);
		}
	}
	
	
	public List<String> getCc() {
		return cc;
	}
	public void setCc(List<String> cc) {
		this.cc = cc;
	}
	
	public void addCc(String cc) {
		if(this.cc == null){
			this.cc=new ArrayList<String>();
		}
		this.cc.add(cc);
	}
	public void addCc(List<String> cc) {
		if(this.cc == null){
			this.cc = cc;
		}else{
			this.cc.addAll(cc);
		}
	}
	

	public String getFrom() {
		return from;
	}

	public void setFrom(String from) {
		this.from = from;
	}
	
	
	public List<Map<String, String>> getAttachment() {
		return attachment;
	}
	public void setAttachment(List<Map<String, String>> attachment) {
		this.attachment = attachment;
	}
	public void addAttachment(Map<String, String> attachment) {
		if(this.attachment == null){
			this.attachment=new ArrayList<Map<String, String>>();
		}
		this.attachment.add(attachment);
	}
	public void addAttachment(List<Map<String, String>> attachment) {
		if(this.attachment == null){
			this.attachment = attachment;
		}else{
			this.attachment.addAll(attachment);
		}
	}
	
	
	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getContentType() {
		return contentType;
	}

	public void setContentType(String contentType) {
		this.contentType = contentType;
	}
	
	public String toString() {
		return "EmailSendStructure [to=" + to + ", bcc=" + bcc + ", cc=" + cc
				+ ", from=" + from + ", attachment=" + attachment
				+ ", subject=" + subject + ", content=" + content
				+ ", content_type=" + contentType + "]";
	}


	public String getIsOut() {
		return isOut;
	}


	public void setIsOut(String isOut) {
		this.isOut = isOut;
	}


	/**
	 * @return the isTransformFileName
	 */
	public Boolean getIsTransformFileName() {
		return isTransformFileName;
	}

	/**
	 * @param isTransformFileName the isTransformFileName to set
	 */
	public void setIsTransformFileName(Boolean isTransformFileName) {
		this.isTransformFileName = isTransformFileName;
	}


	public String getNickName() {
		return nickName;
	}


	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public List<FileVo> getAttFiles() {
		return attFiles;
	}


	public void setAttFiles(List<FileVo> attFiles) {
		this.attFiles = attFiles;
	}

	
	
}
